home *** CD-ROM | disk | FTP | other *** search
- onClipEvent(enterFrame){
- yit = Math.floor(Math.random() * 471) + 30;
- if(this._x < -6000)
- {
- this._x = 5900;
- this._y = _root.depth._y + yit;
- die = 1;
- this.gotoAndPlay(1);
- }
- if(this._x > 6000)
- {
- this._x = -5900;
- this._y = _root.depth._y + yit;
- die = 1;
- this.gotoAndPlay(1);
- }
- this._x += _global.xgo;
- this._y += _global.ygo;
- if(die == 1)
- {
- if(_root.player.eat.hitTest(this.eat))
- {
- die = 0;
- this.gotoAndPlay("die");
- _global.psize = 200;
- _root.player.maxspeed = 20;
- reat22 = new Sound();
- reat22.attachSound("nfxGLIS");
- reat22.start(0,1);
- scoreworth = 200;
- multiplyer = 1;
- if(_root.tools.powerup1._currentframe > 10)
- {
- multiplyer = 2;
- }
- scoreity = Math.round(scoreworth * multiplyer);
- _root.tools.instascore.text = "+" + scoreity;
- _root.tools.instblock._alpha = 0;
- _global.scoreit = _global.scoreit * 1 + scoreity;
- _global.boost += scoreity / 30;
- _global.vincy = 400;
- _root.player.gotoAndStop("invy");
- _root.tools.sidebar1.sidebarflash.gotoAndPlay("yellow");
- _root.tools.sidebar2.sidebarflash.gotoAndPlay("yellow");
- _root.tools.bar1.gotoAndStop(_global.boost + 1);
- }
- }
- }
-